package com.evil.application.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 应用机器人日志表
 *
 * @author liyang
 * @date 2023-01-30 14:49
 */
@Data
@TableName(value = "evil_application_robot_log")
public class ApplicationRobotLog implements Serializable {

    /**
     * id
     */
    @TableId(value = "robot_log_id", type = IdType.AUTO)
    private Long robotLogId;

    /**
     * 请求ID（为0时无效）
     */
    @TableField(value = "request_log_id")
    private Long requestLogId;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 触发应用id
     */
    @TableField(value = "trigger_application_id")
    private Long triggerApplicationId;

    /**
     * 触发订单id
     */
    @TableField(value = "trigger_order_id")
    private Long triggerOrderId;

    /**
     * 源类型（1-应用机器人，2-流程节点机器人，3-自定义按钮机器人）
     */
    @TableField(value = "robot_type")
    private Integer robotType;

    /**
     * 源id
     */
    @TableField(value = "trigger_id")
    private Long triggerId;

    /**
     * 触发者
     */
    @TableField(value = "`trigger_name`")
    private String triggerName;

    /**
     * 目标应用
     */
    @TableField(value = "target_application_id")
    private Long targetApplicationId;

    /**
     * 执行开始时间
     */
    @TableField(value = "action_begin_time")
    private Date actionBeginTime;

    /**
     * 执行结束时间
     */
    @TableField(value = "action_end_time")
    private Date actionEndTime;

    /**
     * 执行参数
     */
    @TableField(value = "action_params")
    private String actionParams;

    /**
     * 执行结果（0-失败，1-成功）
     */
    @TableField(value = "action_result")
    private Integer actionResult;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;

    public static final String COL_ROBOT_LOG_ID = "robot_log_id";

    public static final String COL_REQUEST_LOG_ID = "request_log_id";

    public static final String COL_ENTERPRISE_ID = "enterprise_id";

    public static final String COL_TRIGGER_APPLICATION_ID = "trigger_application_id";

    public static final String COL_TRIGGER_ORDER_ID = "trigger_order_id";

    public static final String COL_ROBOT_TYPE = "robot_type";

    public static final String COL_TRIGGER_ID = "trigger_id";

    public static final String COL_TRIGGER_NAME = "trigger_name";

    public static final String COL_TARGET_APPLICATION_ID = "target_application_id";

    public static final String COL_ACTION_BEGIN_TIME = "action_begin_time";

    public static final String COL_ACTION_END_TIME = "action_end_time";

    public static final String COL_ACTION_PARAMS = "action_params";

    public static final String COL_ACTION_RESULT = "action_result";

    public static final String COL_REMARK = "remark";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}